<%--
XPTracker - Alternative Agile Tracking Tool
Copyright (C) 2006-2009  Stephen Starkey

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
--%>
<%@ include file="taglibs.jsp" %>

<h3>Completed</h3>
<dt:table class="data" name="actionBean.completed" id="story" style="width:800px" requestURI="${url}"
          excludedParams="_sourcePage">
  <dt:column title="Summary"><xp:story-link story="${story}"/></dt:column>
  <dt:column style="width:10%" title="State" sortable="true" sortProperty="state">${story.state}</dt:column>
  <dt:column style="width:10%" title="Queue" sortable="true">${story.queue.name}</dt:column>
  <dt:column style="width:8%" title="Size" sortable="true" sortProperty="size">${story.size}</dt:column>
  <dt:column style="width:5%" title="Estimate" sortProperty="estimate" sortable="true">${story.estimate}</dt:column>
  <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
    <dt:column style="width:5%" title="Remaining" sortable="true" sortProperty="hoursRemaining">
      <fmt:formatNumber value="${story.hoursRemaining}" pattern="###.#"/>
    </dt:column>
  </c:if>
  <dt:column style="width:10%" title="Modified" sortable="true" sortProperty="lastModified">
    <fmt:formatDate value="${story.lastModified}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:column style="width:10%" title="Added" sortable="true">
    <fmt:formatDate value="${actionBean.added[story]}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:footer>
    <xp:with-story-totals stories="${actionBean.completed}">
    <tr>
      <td style="text-align:right">Totals:</td>
      <td/>
      <td/>
      <td>${totalSize}</td>
      <td>${totalEstimate}</td>
      <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
      <td><fmt:formatNumber value="${totalRemaining}" maxFractionDigits="2"/></td>
      </c:if>
      <td/>
      <td/>
    </tr>
    </xp:with-story-totals>
  </dt:footer>
</dt:table>

<h3>Removed</h3>
<dt:table class="data" name="actionBean.removedKeys" id="story" style="width:800px" requestURI="${url}"
          excludedParams="_sourcePage">
  <dt:column title="Summary"><xp:story-link story="${story}"/></dt:column>
  <dt:column style="width:10%" sortable="true" sortProperty="state" title="State">${story.state}</dt:column>
  <dt:column style="width:10%" title="Queue" sortable="true">${story.queue.name}</dt:column>
  <dt:column style="width:8%" title="Size" sortable="true" sortProperty="size">${story.size}</dt:column>
  <dt:column style="width:5%" title="Estimate" sortProperty="estimate" sortable="true">${story.estimate}</dt:column>
  <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
    <dt:column style="width:5%" title="Remaining" sortable="true" sortProperty="hoursRemaining">
      <fmt:formatNumber value="${story.hoursRemaining}" pattern="###.#"/>
    </dt:column>
  </c:if>
  <dt:column style="width:10%" title="Modified" sortable="true" sortProperty="lastModified">
    <fmt:formatDate value="${story.lastModified}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:column style="width:10%" title="Removed" sortable="true">
    <fmt:formatDate value="${actionBean.removed[story]}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:footer>
    <xp:with-story-totals stories="${actionBean.removedKeys}">
    <tr>
      <td style="text-align:right">Totals:</td>
      <td/>
      <td/>
      <td>${totalSize}</td>
      <td>${totalEstimate}</td>
      <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
      <td><fmt:formatNumber value="${totalRemaining}" maxFractionDigits="2"/></td>
      </c:if>
      <td/>
      <td/>
    </tr>
    </xp:with-story-totals>
  </dt:footer>

</dt:table>

<h3>Not Completed</h3>
<dt:table class="data" name="actionBean.existing" id="story" style="width:800px" requestURI="${url}"
          excludedParams="_sourcePage">
  <dt:column title="Summary"><xp:story-link story="${story}"/></dt:column>
  <dt:column style="width:10%" sortable="true" sortProperty="state" title="State">${story.state}</dt:column>
  <dt:column style="width:10%" title="Queue" sortable="true">${story.queue.name}</dt:column>
  <dt:column style="width:8%" title="Size" sortable="true" sortProperty="size">${story.size}</dt:column>
  <dt:column style="width:5%" title="Estimate" sortProperty="estimate" sortable="true">${story.estimate}</dt:column>
  <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
    <dt:column style="width:5%" title="Remaining" sortable="true" sortProperty="hoursRemaining">
      <fmt:formatNumber value="${story.hoursRemaining}" pattern="###.#"/>
    </dt:column>
  </c:if>
  <dt:column style="width:10%" title="Modified" sortable="true" sortProperty="lastModified">
    <fmt:formatDate value="${story.lastModified}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:column style="width:10%" title="Added" sortable="true">
    <fmt:formatDate value="${actionBean.added[story]}" pattern="yyyy-MM-dd"/>
  </dt:column>
  <dt:footer>
    <xp:with-story-totals stories="${actionBean.existing}">
    <tr>
      <td style="text-align:right">Totals:</td>
      <td/>
      <td/>
      <td>${totalSize}</td>
      <td>${totalEstimate}</td>
      <c:if test="${xp:toStr(actionBean.timeline.units) eq 'hoursRemaining'}">
      <td><fmt:formatNumber value="${totalRemaining}" maxFractionDigits="2"/></td>
      </c:if>
      <td/>
      <td/>
    </tr>
    </xp:with-story-totals>
  </dt:footer>

</dt:table>